package co.jp.roomy;

import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DatabaseHelper extends SQLiteOpenHelper {
	
	public DatabaseHelper(Context context) {
		super(context, "roomy.db", null, 1);	
	}

	/* (non-Javadoc)
	 * @see android.database.sqlite.SQLiteOpenHelper#onCreate(android.database.sqlite.SQLiteDatabase)
	 */
	@Override
	public void onCreate(SQLiteDatabase db) {
//		db.execSQL("DROP TABLE M_CATEGORY");
//		db.execSQL("DROP TABLE M_KAGU");
		//db.execSQL("CREATE TABLE M_CATEGORY (categoryId INTEGER PRIMARY KEY AUTOINCREMENT, categoryName TEXT)");
		db.execSQL("CREATE TABLE M_CATEGORY (categoryId INTEGER, cateogryName TEXT)");
		//createMCategoryValues(db);
		db.execSQL("CREATE TABLE M_KAGU (kaguId INTEGER PRIMARY KEY AUTOINCREMENT, categoryId INTEGER, kaguName TEXT)");
		//createMKaguValues(db);
		db.execSQL("CREATE TABLE T_MYKAGU (myKaguId INTEGER PRIMARY KEY AUTOINCREMENT, kaguId INTEGER, heyaId INTEGER, myKaguName TEXT, myKaguSizeX INTEGER, myKaguSizeY INTEGER, myKaguSizeZ INTEGER, myKaguPosX INTEGER, myKaguPosY INTEGER, myKaguPosZ INTEGER, myKaguAngle INTEGER)");
		db.execSQL("CREATE TABLE T_HEYA (heyaId INTEGER PRIMARY KEY AUTOINCREMENT, heyaName TEXT, heyaSizeX INTEGER, heyaSizeY INTEGER, heyaSizeZ INTEGER, heyaColor TEXT, heyaMemo TEXT)");
	}
	
	@Override
	public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
	}
}
